import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../Layout/Layout.vue'

const routes = [
    {
        path:'/login',
        name:'login',
        component : () => import('../views/Login.vue')
    },
    {
        path:'/register',
        name:'register',
        component : () => import('../views/Register.vue')
    },

 {
    path:'/',
    name:'Layout',
    component :Layout,
     redirect:"/login",
     children:[
         {
             path:'/Home',
             name:'Home',
             component : () => import('../views/Home.vue')
         },
         {
             path:'/Student',
             name:'Student',
             component : () => import('../views/Student.vue')
         },

         {
             path:'/Scholarship',
             name:'Scholarship',
             component : () => import('../views/Scholarship.vue')
         },

         {
             path:'/Rule',
             name:'Rule',
             component : () => import('../views/Rule.vue')
         },
         {
             path:'/Apply',
             name:'Apply',
             component : () => import('../views/Apply.vue')
         },
         {
             path:'/File',
             name:'File',
             component : () => import('../views/File.vue')
         }

     ]
  },

]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router